﻿@*
    Copyright 2014 Francois Karman

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*@
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Quartz WebManager</title>
    @Styles.Render("~/Content/css")
    @RenderSection("styles", required: false)
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/spin")
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                @Html.ActionLink("Quartz WebManager", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li>@Html.ActionLink("API", "Index", "Help", new { area = "" }, null)</li>
                </ul>
                <form action="@Url.Action("Index", "AddJob", new { area = "" }, null)" method="get">
                    <button type="submit" class="navbar-right btn btn-default navbar-btn">
                        <span class="glyphicon glyphicon-plus"></span> New job
                    </button>
                </form>
            </div>
        </div>
    </div>
    <div class="container body-content">
        @RenderBody()
        <footer>
            <div class="pull-right">
                @Html.ActionLink("License", "License", "Info", new { area = "" }, null)
                @Html.ActionLink("Notice", "Notice", "Info", new { area = "" }, null)
            </div>
            <div>
                &copy; @DateTime.Now.Year - Fran&ccedil;ois Karman
            </div>
        </footer>
    </div>
    @* Integrate the spinners for the loading areas *@
    <script>
        var opts = {
            position: 'relative',
            top: '25px',
            left: '25px',
            color: '#dd6600',
            trail: 60,
            shadow: false,
        };

        var nodes = document.getElementsByClassName('loading');
        for (var i = 0; i < nodes.length; i++) {
            var spinner = new Spinner(opts).spin();
            nodes[i].appendChild(spinner.el);
        }
    </script>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)
</body>
</html>
